package com.wangjiang.mario.admin.system.domain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wangjiang.mario.admin.system.domain.entity.RoleMenuEntity;
import com.wangjiang.mario.admin.system.domain.entity.UserEntity;
import com.wangjiang.mario.admin.system.object.user.UserQo;
import com.wangjiang.mario.admin.system.object.user.UserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface UserMapper extends BaseMapper<UserEntity> {

    UserEntity findByLoginName(@Param("loginName") String loginName);

    Integer findCountByLoginName(@Param("loginName") String loginName);

    Page<UserVo> relatedPage(IPage page, @Param("qo") UserQo qo);

    List<RoleMenuEntity> getRoleMenuByUserUUid(@Param("userUUid") String userUUid);

    UserEntity findRelatedByUUid(@Param("userUUid") String uuid);
}
